# -- get header files for creating "proper" XCode projects ---------------------

file(GLOB_RECURSE CAF_NET_HEADERS "caf/*.hpp")

# -- add targets ---------------------------------------------------------------

configure_file(test/pem.cpp.in test/pem.cpp @ONLY)

caf_add_component(
  net
  DEPENDENCIES
  PUBLIC
    $<$<CXX_COMPILER_ID:MSVC>:ws2_32>
    CAF::core
    OpenSSL::Crypto
    OpenSSL::SSL
  PRIVATE
    CAF::internal
  ENUM_TYPES
    net.http.method
    net.http.status
    net.octet_stream.errc
    net.ssl.dtls
    net.ssl.errc
    net.ssl.format
    net.ssl.tls
    net.web_socket.status
  HEADERS
    ${CAF_NET_HEADERS}
  SOURCES
    caf/detail/convert_ip_endpoint.cpp
    caf/detail/rfc6455.cpp
    caf/detail/rfc6455.test.cpp
    caf/net/abstract_actor_shell.cpp
    caf/net/actor_shell.cpp
    caf/net/datagram_socket.cpp
    caf/net/dsl/config_base.cpp
    caf/net/generic_lower_layer.cpp
    caf/net/generic_upper_layer.cpp
    caf/net/http/config.cpp
    caf/net/http/lower_layer.cpp
    caf/net/http/method.cpp
    caf/net/http/request.cpp
    caf/net/http/request_header.cpp
    caf/net/http/responder.cpp
    caf/net/http/response.cpp
    caf/net/http/route.cpp
    caf/net/http/router.cpp
    caf/net/http/server.cpp
    caf/net/http/server_factory.cpp
    caf/net/http/status.cpp
    caf/net/http/upper_layer.cpp
    caf/net/http/v1.cpp
    caf/net/ip.cpp
    caf/net/lp/default_trait.cpp
    caf/net/lp/frame.cpp
    caf/net/lp/framing.cpp
    caf/net/lp/lower_layer.cpp
    caf/net/lp/upper_layer.cpp
    caf/net/middleman.cpp
    caf/net/multiplexer.cpp
    caf/net/network_socket.cpp
    caf/net/octet_stream/lower_layer.cpp
    caf/net/octet_stream/policy.cpp
    caf/net/octet_stream/transport.cpp
    caf/net/octet_stream/upper_layer.cpp
    caf/net/pipe_socket.cpp
    caf/net/prometheus.cpp
    caf/net/socket.cpp
    caf/net/socket_event_layer.cpp
    caf/net/socket_manager.cpp
    caf/net/ssl/connection.cpp
    caf/net/ssl/context.cpp
    caf/net/ssl/dtls.cpp
    caf/net/ssl/errc.cpp
    caf/net/ssl/format.cpp
    caf/net/ssl/password.cpp
    caf/net/ssl/startup.cpp
    caf/net/ssl/tcp_acceptor.cpp
    caf/net/ssl/tls.cpp
    caf/net/ssl/transport.cpp
    caf/net/ssl/verify.cpp
    caf/net/stream_socket.cpp
    caf/net/tcp_accept_socket.cpp
    caf/net/tcp_stream_socket.cpp
    caf/net/this_host.cpp
    caf/net/udp_datagram_socket.cpp
    caf/net/web_socket/client.cpp
    caf/net/web_socket/default_trait.cpp
    caf/net/web_socket/frame.cpp
    caf/net/web_socket/framing.cpp
    caf/net/web_socket/handshake.cpp
    caf/net/web_socket/lower_layer.cpp
    caf/net/web_socket/server.cpp
    caf/net/web_socket/upper_layer.cpp
  LEGACY_TEST_SOURCES
    ${CMAKE_CURRENT_BINARY_DIR}/test/pem.cpp
    test/net-test.cpp
  LEGACY_TEST_SUITES
    detail.convert_ip_endpoint
    net.accept_socket
    net.actor_shell
    net.datagram_socket
    net.http.router
    net.http.server
    net.ip
    net.length_prefix_framing
    net.lp.frame
    net.multiplexer
    net.network_socket
    net.octet_stream.transport
    net.pipe_socket
    net.socket
    net.socket_guard
    net.ssl.transport
    net.stream_socket
    net.tcp_socket
    net.typed_actor_shell
    net.udp_datagram_socket
    net.web_socket.client
    net.web_socket.frame
    net.web_socket.framing
    net.web_socket.handshake
    net.web_socket.server)
